<?php

/**
 * Created by PhpStorm.
 * User: gogochen
 * Date: 2019/7/19
 * Time: 17:00
 */

namespace App\HttpController;


use App\Model\User\UserModel;
use App\Utility\Pool\MysqlPool;
use EasySwoole\Http\AbstractInterface\Controller;

class User extends Controller
{
    public function index()
    {
        // TODO: Implement index() method.
        $db = MysqlPool::defer();
        $userModel = new UserModel($db);
        $data = $userModel->getData();
        return $this->writeJson(200, $data, 'ok');
    }

    public function getData()
    {


    }

}